home *** CD-ROM | disk | FTP | other *** search
/ Computer Life 1997 February / Computer Life February 1997.iso / TELME / COMMS / TMGATE.SRP < prev    next >
Text File  |  1996-06-04  |  2KB  |  101 lines

  1. rem Copyright (c) PhoneLink plc 
  2. rem SCII - ISDN (24.5.95)
  3.  
  4. label InitDevice
  5. echo off
  6. label OffToGate 
  7. rem ISDN Offline to Gate (also contains Pad to Gate)
  8. echo off
  9. echo Making call...
  10. EstablishIsdnCall    "{PreTel}{SiteTel}{PostFix}"
  11. timeout 10,connect_fail
  12. finderr 0,BUSY,busy
  13. finderr 103,NO DIALTONE,connect_fail
  14. finderr 0,NO CARRIER,no_carrier
  15. finderr 0,OFFLINE,no_carrier
  16. find    "CONNECT"
  17. label PadToGate
  18. echo off
  19.  
  20. MakeCall    "{NUA}"
  21. timeout 3,nua_bad1
  22. finderr 0,COM,nua_good
  23. find    "ZZZ"
  24. label nua_bad1
  25. MakeCall    "{NUA}"
  26. timeout 3,nua_bad2
  27. finderr 0,COM,nua_good
  28. find    "ZZZ"
  29. label nua_bad2
  30. MakeCall    "{NUA}"
  31. timeout 3,nua_fail
  32. finderr 0,CLR,cleared
  33. find    "COM"
  34. label nua_good
  35. echo Call connected.
  36. end
  37.  
  38. label GateToPad
  39. echo off
  40. ClearCall
  41. timeout 10,clear_fail
  42. finderr 0,OFFLINE,no_carrier
  43. find "CLR"
  44. echo Waiting on line...
  45. end
  46.  
  47. label GateToOff
  48. rem Gate to Offline (also contains Pad to Offline)
  49. echo off
  50. ClearCall
  51. timeout 10,clear_fail
  52. finderr 0,OFFLINE,no_carrier
  53. find "CLR"
  54. label PadToOff
  55. echo off 
  56. BreakIsdnCall
  57. timeout 5,offline_fail
  58. find    "OFFLINE"
  59. echo Offline.
  60. end
  61.  
  62. label modem_offline
  63. ClearCall
  64. timeout 5,command_mode
  65. finderr 0,OFFLINE,no_carrier
  66. find    "CLR"
  67. label command_mode
  68. BreakIsdnCall
  69. timeout 5,hang_up
  70. find    "OFFLINE"
  71. label hang_up
  72. abort
  73.  
  74. label connect_fail
  75. echo script[1]
  76. goto command_mode
  77.  
  78. label busy
  79. echo script[2]
  80. goto command_mode
  81.  
  82. label no_carrier
  83. echo script[3]
  84. goto command_mode
  85.  
  86. label nua_fail
  87. echo script[22]
  88. goto command_mode
  89.  
  90. label cleared
  91. echo script[21]
  92. goto command_mode
  93.  
  94. label clear_fail
  95. echo script[13]
  96. goto modem_offline
  97.  
  98. label offline_fail
  99. echo script[18]
  100. goto command_mode
  101.